package zh.servers;

public  class StoneImp implements  Stone {
    @Override
    public int gameStandard(int computer, int person) {
        int result = 0;
        switch (computer) {
            case 0:
                if (person == 0) {
                    result = 2;
                    System.out.println("平局");
                } else if (person == 1) {
                    result = 0;
                    System.out.println("你输了");
                } else {
                    result = 1;
                    System.out.println("你赢了");
                }
                break;
            case 1:
                if (person == 1) {
                    result = 2;
                    System.out.println("你输了");
                } else if (person == 0) {
                    result = 0;
                    System.out.println("平局");
                } else {
                    result = 2;
                    System.out.println("你赢了");
                }
                break;
            case 2:
                if (person == 2) {
                    result = 2;
                    System.out.println("平局");
                } else if (person == 0) {
                    result = 0;
                    System.out.println("你输了");
                } else {
                    result = 1;
                    System.out.println("你赢了");
                }
                break;
        }
        return result;
    }

}